SGGrabPict
TheSGGrabPict
function provides a simple interface that allows your application to obtain a QuickDraw picture from a sequence grabber component. The sequence grabber can display the picture directly, or it can write the picture to an offscreen buffer. This function is limited in scope, however, and does not allow you to control all of the parameters that govern the operation. When you call this function, the sequence grabber component obtains and configures appropriate sequence grabber channel components (if necessary), grabs the data, and then releases any components it obtained.
pascal ComponentResult SGGrabPict (SeqGrabComponent s, PicHandle *p, const Rect *bounds, short offscreenDepth, long grabPictFlags);
s
- Specifies the component instance that identifies your connection to the sequence grabber component. You obtain this value from the Component Manager's
OpenDefaultComponent
orOpenComponent
function.p
- Contains a pointer to a field that is to receive a handle to the picture. If the
SGGrabPict
function cannot create the picture, it sets this handle tonil
.bounds
- Contains a pointer to the boundary region for the picture. By default,
this rectangle lies in the current graphics port. If you set thegrabPictOffScreen
flag in thegrabPictFlags
parameter to 1, the sequence grabber places the picture in an offscreen graphics world. In this case, the rectangle is interpreted in that offscreen world.offscreenDepth
- Specifies the pixel depth for the offscreen graphics world. This parameter is typically set to 0, which chooses the best available depth. If you set the
grabPictOffScreen
flag in thegrabPictFlags
parameter to 1, the sequence grabber places the picture in an offscreen graphics world. You specify the pixel depth of this offscreen graphics world with this parameter. If you are displaying the picture, this parameter is ignored.grabPictFlags
- Contains flags that control the operation. The following flags are defined (set unused flags to 0):
grabPictOffScreen
- Instructs the sequence grabber to place the picture in
an offscreen graphics world. Set this flag to 1 to
use an offscreen graphics world. In this case, you use theoffscreenDepth
parameter to specify the pixel depth
in the offscreen buffer. In addition, the rectangle specified by thebounds
parameter is applied to the offscreen buffer.grabPictIgnoreClip
- Instructs the sequence grabber to ignore any clipping regions you may have defined for the sequence grabber's channels. Set this flag to 1 to have the sequence grabber ignore these clipping regions.
DESCRIPTION
If you have created any channels for the sequence grabber component, theSGGrabPict
function uses those channels to obtain the data for the captured image.SPECIAL CONSIDERATIONS
Some digitizer sources do not support grabbing offscreen, so theSGGrabPict
function may fail. In this case, try again grabbing onscreen.RESULT CODES
File Manager errors
notEnoughMemoryToGrab -9403 Insufficient memory for record operation deviceCantMeetRequest -9408 Device cannot support grabber
Memory Manager errors
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help